<template>
	<view class="mainbgc">
		<view class="mainpadding">
			<view class="" v-if="type==1">
				<u-parse :content="dataAll.about_us"></u-parse>
			</view>
			<view class="" v-if="type==2">
				<u-parse :content="dataAll.user_xy"></u-parse>
			</view>
			<view class="" v-if="type==3">
				<u-parse :content="dataAll.user_yszc"></u-parse>
			</view>
			<view class="" v-if="type==4">
				<u-parse :content="dataAll.vip_apply_des"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	 const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				type:1,//1关于我们，2用户协议，3隐私政策，4vip申请介绍
				dataAll:{} 
			}
		},
		onLoad(options) {
			this.type = options.type
			if(this.type==1){
				uni.setNavigationBarTitle({
				    title:"关于我们"
				})
			}else if(this.type==2){
				uni.setNavigationBarTitle({
				    title:"用户协议"
				})
			}else if(this.type==3){
				uni.setNavigationBarTitle({
				    title:"隐私政策"
				})
			}else if(this.type==4){
				uni.setNavigationBarTitle({
				    title:"vip申请介绍"
				})
			}
			this.getinfo() 
		},
		methods: {
			 getinfo() {
			 	httpRequest.request('/api/index/getConfigInfo', 'GET', {}, false, false, true).then(res => {
			 		if (res.code == 1) {
			 			this.dataAll = res.data
			 		}
			 	}).catch(err => {
			 		httpRequest.toast(err.msg);
			 	})
			 },
		}
	}
</script>

<style scoped lang="scss">
	.content{
		padding: 0 60rpx;
	}
	.img{
		width: 160rpx;
		height: 160rpx;
		margin: 0 auto;
		padding-top: 120rpx;
		image{
			width: 100%;
			height: 100%;
		}
	}
	.banben{
		margin-top: 60rpx;
		text-align: center;
		font-size: 32rpx;
		color: #000000;
	}
	.jianjie{
		font-size: 26rpx;
		color: #666666;
		text-align: center;
		margin-top: 70rpx;
	}
</style>
